package bounce;

import junit.framework.TestCase;

/**
 * Test cases to test GemShape.
 * 
 * @author Ken Neth Yeoh
 *
 */

public class TestGemShape extends TestCase{
	private MockPainter painter;
	
	public void setUp() {
		painter = new MockPainter();
	}
	
	public void testSmallGem() {
		GemShape shape = new GemShape(0, 0, 5, 5, 10, 10);
		shape.paint(painter);
		assertEquals("(line 0,5,5,0)(line 5,0,5,0)(line 5,0,10,5)(line 10,5,5,10)(line 5,10,5,10)(line 5,10,0,5)", painter.toString());
	}
	
	public void testRegularGem() {
		GemShape shape = new GemShape(0,0,5,5,80,80);
		shape.paint(painter);
		assertEquals("(line 0,40,20,0)(line 20,0,60,0)(line 60,0,80,40)(line 80,40,60,80)(line 60,80,20,80)(line 20,80,0,40)", painter.toString());
	}
}
